<template>
	<div>
		<div class="i_index_title">
			<span class="index_title">资讯</span>
			<van-icon class="fanhui" size="30" @click="fanhui" name="arrow-left" />
		</div>
		<div class="boxww">
			<div style="padding: 20px;">
				<h3>{{value.newsTitle}}</h3>
				<p style="margin-top: 10px; font-size: 13px;">{{value.createTime}}</p>
				<p class="ddd" v-html="value.newsContent">{{value.newsContent}}</p>
				
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				id:'',
				value:[]
			}
		},
		created() {
			this.id=this.$route.query.newsId
			// console.log(this.$route.query)
			this.xq()
		},
		methods:{
			fanhui(){
				this.$router.go(-1);
			},
			xq(){
				this.$axios.post('http://a.chuxingcai.com/prod-api/webapi/news/detail',{
					newsId:this.id
				},{
					headers:{
					  token:window.sessionStorage.getItem('token')
					}
				}).then((res) => {
					console.log(res)
					this.value=res.data.data
				})
			}
		}
	}
</script>

<style>
	.i_index_title{
		width: 100%;
		height: 50px;
		background-color: #F74A4B;
	}
	.fanhui{
		position: absolute;
		top: 50%;
		transform: translate(0,-50%);
		color: white;
	}
	.index_title{
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
		color: white;
	}
	.boxww{
		width: 100%;
		background-color: white;
		margin: 0 auto;
	}
	.ddd{
		margin-top: 20px;
	}
	.ddd img{
		width: 100%;
	}
</style>
